package cn.marinda.resturants.utils;

import javax.servlet.http.HttpServletRequest;

/** 验证工具类
 * deng
 *
 * @version 1.0
 * @author Marinda
 *
 *
 */
public class ValidUtils {

    /**  通过session储存的verify
     * @version 1.0
     * @date 2021/11/29
     */
    public static boolean validVerifyCode(String verifyCode, HttpServletRequest httpServletRequest){
        String sessionVerifyCode = (String) httpServletRequest.getSession().getAttribute("verifyCode");
        return verifyCode.equalsIgnoreCase(sessionVerifyCode);
    }
}
